package controller

import (
	"fmt"
	"go-pipe/api/utilsfile/settings"
	"go-pipe/api/utilsfile/settings/utils"
)

func Query(sqls string) (result []map[string]string) {

	rows, err := settings.Db.Query(sqls)
	defer rows.Close()
	fmt.Println(err)

	if err != nil {
		fmt.Println("mysql query error", err.Error())
	}
	defer rows.Close()
	result = utils.GetRows(rows)
	return
}
